package com.graducationdesign.springboot.service.impl;

import com.graducationdesign.springboot.dao.RecruitmentInformationDao;
import com.graducationdesign.springboot.entities.crawling.RecruitmentInformation;
import com.graducationdesign.springboot.service.RecruitmentInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author Mr.zhneg
 * @create 2020-05-21-23:38
 */
@Service
public class RecruitmentInformationServiceImpl implements RecruitmentInformationService {

    @Autowired

    private RecruitmentInformationDao recruitmentInformationDao;
    //保存招聘信息

    @Override
    @Transactional

    public void save(RecruitmentInformation item) {
        recruitmentInformationDao.save(item);
    }
    //根据条件招聘信息

    @Override
    public List<RecruitmentInformation> findAll(RecruitmentInformation item) {
        //声明查询条件
        Example<RecruitmentInformation> example = Example.of(item);
        return recruitmentInformationDao.findAll(example);
    }


}
